import Vue from 'vue';
import App from './App';
import {VMC} from 'vmc';
import Touch from 'vue-touch';
import Router from 'vue-router';
import Resource from 'vue-resource';
import * as utils from './assets/js/utils';

Vue.prototype.$global = {
    utils
};

Vue.use(Touch);
Vue.use(Resource);
Vue.use(Router);
Vue.use(VMC);

var router = new Router();
var routes = require('./pages/routes');
router.map(routes);

router.redirect({
    '*': '/Ucenter'
});

router.start(App, 'body');

var attachFastClick = require('fastclick');
attachFastClick.attach(document.body);